<table class="table table_addr" style="">
    <tr><td><span>UPSA</span></td></tr>
    <tr><td><span>University of Profesional Studies, Accra</span></td></tr>
    <tr><td><span>Student Name: <b> <?php echo $auth_user['fname'].' '.$auth_user['mname'].' '.$auth_user['lname']; ?></b></span></td></tr>
    <tr><td><span>Index Number: <b> <?php echo $auth_user['index_number']; ?></b> </span></td></tr>
    <tr><td><span>Programme: <b> <?php echo $program['Program']['name']; ?></b> </span></td></tr>
    <tr><td><span>Wallet Balance: <b> <?php echo 'GHS '. $controller->formatNumber($auth_user['account_balance'],'money'); ?></b></span></td></tr>
    <!--<tr><td><span>Computer Generated Copy: </span></td></tr>-->
</table>

<div class="row-fluid">
    <div class="span12">
        <div class="top" style="text-align: center">
            <div> <b><u> <?php echo $print_title; ?></u></b></div>
        </div>
    </div>
</div>

<table class="table table-striped data-table table-bordered">
    <thead>
        <tr>
            <!--<th colspan="2"><?php /*echo $this->Paginator->sort('Transaction Type', 'MemberGame.start_dt'); */?></th>-->
            <th colspan="2">Transaction Type</th>
            <th>Amount (GHC)</th>
            <th>Date</th>
            <th>Reference</th>
        </tr>
    </thead>
    <tbody>
        <?php
        if(!empty($transactData)){

            $count = 1;
            foreach( $transactData as $val ) {
                $semester = '';
                $acc_year = '';
                if(isset($val['Fee']['FeeType'])){
                    $reference = $val['Fee']['FeeType']['description'];
                }
                else{
                    $reference = '';
                }

                if(isset($val['Transaction']['AcademicSession']['semester'])){
                    $semester = 'Semester '.$val['Transaction']['AcademicSession']['semester'];
                }
                if(isset($val['Transaction']['AcademicSession']['acc_year'])){
                    $acc_year = $val['Transaction']['AcademicSession']['acc_year'].' Academic Year';
                }
            ?>
            <tr class="data-row">
                <td><?php echo $count++.'.'; ?></td>
                <td><?php echo $val['TransactionItem']['desc']; ?></td>
                <td class="col_amt"><?php echo $controller->formatNumber($val['TransactionItem']['credit_amt'],'money'); ?></td>
                <td><?php echo date("d M Y, g:ia", strtotime($val['Transaction']['created'])); ?></td>
                <td><?php echo $reference; ?></td>
            </tr>
                <?php
            }
        }
        else{
            ?>
        <tr>
            <td colspan="6" class="cell1">
                <div>
                    Sorry you do not have any transaction histories.
                </div>
            </td>
        </tr>
            <?php
        }
        ?>
    </tbody>
</table>